<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.LoginTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.UsuarioLabel_login}" for="login" />
                    <h:inputText id="login" value="#{usuarioController.logado.login}" 
                                 title="#{bundle.UsuarioTitle_login}" 
                                 required="true" 
                                 requiredMessage="#{bundle.loginUsuarioRequired}"
                                 validator="#{usuarioController.validaUsuario}"
                    />
                    <h:outputLabel value="#{bundle.UsuarioLabel_senha}" for="senha" />
                    <h:inputSecret id="senha" value="#{usuarioController.logado.senha}" title="#{bundle.UsuarioTitle_senha}" />
                </h:panelGrid>
                <br />
                <h:commandButton action="#{usuarioController.selecionaLogin(usuarioController.logado.login,usuarioController.logado.senha)}" value="#{bundle.ConectLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
